﻿<UserControl x:Class="SimCityPak.ViewText"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:simCityPak="clr-namespace:SimCityPak"
             DataContextChanged="OnDataContextChanged">
    <Grid>
        <TextBox Margin="0,0,0.475,30.95" x:Name="textBoxRawData" VerticalScrollBarVisibility="Auto" FontFamily="Courier New" SelectionChanged="textBoxRawData_SelectionChanged" ScrollViewer.CanContentScroll="True" HorizontalScrollBarVisibility="Auto" AcceptsReturn="True" AcceptsTab="True" TextChanged="textBoxRawData_TextChanged">
            <TextBox.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Cut" Command="ApplicationCommands.Cut"/>
                    <MenuItem Header="Copy" Command="ApplicationCommands.Copy"/>
                    <MenuItem Header="Paste" Command="ApplicationCommands.Paste"/>
                    <MenuItem Header="FNV Value" IsEnabled="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu},
              Path=PlacementTarget.SelectedText.Length}" Click="OnMnFNVClick"/>
                </ContextMenu>
            </TextBox.ContextMenu>
        </TextBox>
        <StatusBar Margin="0,0,0.475,-0.05" Height="31" VerticalAlignment="Bottom">
            <Label Content="Line:" Width="33"/>
            <TextBox x:Name="txtLineNumber" Height="22" TextWrapping="Wrap" Text="" Width="47" TextChanged="txtLineNumber_Changed"/>
            <Button Content="Find" Width="75" Click="btnFind_Click"/>
        </StatusBar>
    </Grid>
</UserControl>
